# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年12月02日
"""
import pandas as pd

pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
pd.set_option('display.unicode.east_asian_width', True)
df = pd.read_csv('../source/JD.csv', encoding='gbk')
print(df.head())
print("=" * 30)
# df1 = df[['一级分类', '7天点击量', '订单预定']]
# for name, group in df1.groupby('一级分类'):
# 	print(name)
# 	print(group)

df1 = df[['一级分类', '二级分类', '7天点击量', '订单预定']]
for (key1, key2), group in df1.groupby(['一级分类', '二级分类']):
	print(key1, key2)
	print(group)
